*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

.layout{
    min-width: 320px;
    max-width:640px;
    margin:0  auto;
    header{
        position:fixed;
        min-width: 320px;
        max-width:640px;
        color:#fff;
        height:0.8rem;
        background-color: red;
        a{
            position: absolute;
            left:0;
            padding:0 0.2rem;
            color:#fff;

        }
        text-align: center;
        font-size: 0.3rem;
        line-height: 0.8rem;
    }
    >div{
       padding:0.8rem  0  1rem;
       
        .bg{
            width:100%;
            img{
                width:100%;
                height:3rem;
                display:block;
            }
        }

        nav{
            ul{
                width:100%;
                padding:0.1rem 0;
                overflow: hidden;
                li{
                    width:25%;
                    float:left;
                    text-align: center;
                    a{
                        display: block;
                        width:100%;
                        p{
                            &:nth-child(2){
                                font-size:0.18rem;
                            }
                        }
                    }
                }
            }
        }

        main{
            width:100%;
            div{
                
                img{
                    width:100%;
                    display:block;
                }
                p{
                    font-size: 0.25rem;
                }
            }
        }
    }
    footer{
        position:fixed;
        min-width: 320px;
        max-width:640px;
        bottom:0;
        background-color: #999;

        
        ul{
            width:100%;
            padding:0.1rem 0;
            overflow: hidden;
            li{
                width:25%;
                float:left;
                text-align: center;
                a{
                    display: block;
                    width:100%;
                    p{
                        &:nth-child(2){
                            font-size:0.18rem;
                        }
                    }
                }
            }
        }
    }
}